<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //判断成绩甲等(大于90)、乙等(大于80)、丙等(大于60)、不合格，控制台打印
    let cj=prompt(); 
    let num=Number(cj); 
        switch (num){
            case 90:
                console.log('恭喜你是甲等'); 
                break; 
            case 80:
                console.log('恭喜你是乙等'); 
                break; 
            case 60:
                console.log('恭喜你是丙等'); 
                break; 
            default:
                console.log('很抱歉,你没有及格'); 
                break;
        }
    console.log('----------------------------------');
//循环 打印1-100,计算1-100的和
    //打印1-100
    for(let i=1;i<=100;i++){
        console.log(i);
    }
    console.log('---------------------------------');	
    //计算1-100的和 
    let sum=0;
    for(let i=1;i<=100;i++){
        sum+=i;
        // sum=sum+i;
    }
    console.log(sum);
</script>
</html>